﻿package com.xcesys.extras.test.ws;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

@ContextConfiguration(locations = { "classpath*:test-service*.xml" })
public class AbstractWSRemoteTestCase extends AbstractJUnit4SpringContextTests {
	private final static String SERVER_URL = "http://localhost:8080/extras/service";

	protected Object getServiceBean(String name) {
		JaxWsProxyFactoryBean factory = (JaxWsProxyFactoryBean) applicationContext
				.getBean(name);
		factory.setAddress(SERVER_URL + factory.getAddress());
		return factory.create();
	}
}
